﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
using System.ComponentModel;

namespace BUS
{
    public class AccountBUS
    {
        AccountDAO AccDAO = new AccountDAO();

        public int InsertAccount(AccountDTO Acc)
        {
            return AccDAO.InsertAccount(Acc);
        }

        public bool UpdateAccount(AccountDTO Acc)
        {
            return AccDAO.UpdateAccount(Acc);
        }

        public bool DeleteAccount(int ID)
        {
            return AccDAO.DeleteAccount(ID);
        }

        public BindingList<AccountDTO> GetNewBindingList()
        {
            return AccDAO.GetNewBindingList();
        }

        public AccountDTO GetAccountByID(int ID)
        {
            return AccDAO.GetAccountByID(ID);
        }

        public bool Login(string userName, string password,out AccountDTO acc)
        {
            return AccDAO.Login(userName, password, out acc);
        }
    }
}
